package org.mcflier.appuntamento.io.driver.db.interfaces;

import java.util.List;

import org.mcflier.appuntamento.data.model.Production;
import org.mcflier.appuntamento.io.exception.JDBCConnectionException;
import org.mcflier.appuntamento.io.exception.JDBCStatementException;
import org.mcflier.appuntamento.io.exception.JDBCTransactionException;

public interface IJDBCProductionDriver {
	
	public boolean addProduction(Production production, boolean useTransaction) throws JDBCStatementException, JDBCTransactionException, JDBCConnectionException;
	
	public int addProductions(List<Production> productions) throws JDBCTransactionException, JDBCStatementException, JDBCConnectionException; 
	
	public boolean existsProduction(int id) throws JDBCStatementException, JDBCConnectionException;
	
	//Return a list with the stored productions' id
	public List<Integer> existProductions(List<Integer> ids) throws JDBCStatementException, JDBCConnectionException;
	
	public Production getProduction(int id) throws JDBCStatementException, JDBCConnectionException;
	
	public List<Production> getMovieProductions(String idMovie) throws JDBCConnectionException, JDBCStatementException;
	
	public boolean deleteProduction(int id, boolean useTransaction) throws JDBCTransactionException, JDBCStatementException, JDBCConnectionException;
}
